﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Stats.aspx.vb" Inherits="examquestions.Stats" %>
<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="page-header">
        <h2>Top 5 most popular subjects</h2>
      </div>
        <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource1" class="img-responsive">
            <series>
                <asp:Series Name="Series1" XValueMember="subjectID" 
                    YValueMembers="questionsBySubject">
                </asp:Series>
            </series>
            <chartareas>
                <asp:ChartArea Name="ChartArea1">
                </asp:ChartArea>
            </chartareas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ExamQuestionsConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ExamQuestionsConnectionString.ProviderName %>" 
            SelectCommand="SELECT [subjectID], [questionsBySubject] FROM [top5subjects]">
        </asp:SqlDataSource>
    </p>
   <div class="page-header">
        <h2>Top 5 most popular exams</h2>
      </div>
        <asp:Chart ID="Chart2" runat="server" DataSourceID="SqlDataSource2" class="img-responsive">
            <series>
                <asp:Series Name="Series1" XValueMember="examTypeID" 
                    YValueMembers="questionsByExam">
                </asp:Series>
            </series>
            <chartareas>
                <asp:ChartArea Name="ChartArea1">
                </asp:ChartArea>
            </chartareas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ExamQuestionsConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ExamQuestionsConnectionString.ProviderName %>" 
            SelectCommand="SELECT [examTypeID], [questionsByExam] FROM [top5exams]">
        </asp:SqlDataSource>
    </p>
    <div class="page-header">
        <h2>Top 10 authors by number of questions</h2>
      </div>
        
        <asp:Chart ID="Chart3" runat="server" DataSourceID="SqlDataSource3" class="img-responsive">
            <series>
                <asp:Series Name="Series1" XValueMember="author" 
                    YValueMembers="questionsByAuthor">
                </asp:Series>
            </series>
            <chartareas>
                <asp:ChartArea Name="ChartArea1">
                </asp:ChartArea>
            </chartareas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ExamQuestionsConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ExamQuestionsConnectionString.ProviderName %>" 
            SelectCommand="SELECT [author], [questionsByAuthor] FROM [top5authors]">
        </asp:SqlDataSource>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
</asp:Content>
